<template>
  <div class="comment-refer">
    <refer-comment v-if="refers.length > 1" :refers="nextRefers"></refer-comment>
    <p class="vita-comment-author">{{refer.author}}</p>
    <p class="vita-comment-content">{{refer.content}}</p>
  </div>
</template>

<script>
  export default {

    name: 'refer-comment',

    props: ['refers'],

    computed: {
      nextRefers() {
        return this.refers.slice(1, this.refers.length)
      },
      refer() {
        return {
          'author': this.refers[0].refertitle,
          'content': this.refers[0].referbody
        }
      }
    }

  }
</script>